Difference between revisions of "Se poate scrie un nume de functie cu diacritice ?"

From HaskellWiki
Jump to navigation Jump to search
m (New page: Category:Ro In unele situatii, da. De exemplu, daca folositi GHC - The Glasgow Haskell Compiler sau GHCI - GHC Interactiv, puteti rula un program ca acesta: <haskell> module Jumătat...)
 
m (To be deleted...)
 
Line 28: Line 28:
   
 
Dar interpretorul Hugs pe care l-am folosit nu a permis asa ceva.
 
Dar interpretorul Hugs pe care l-am folosit nu a permis asa ceva.
  +
  +
[[Category:Pages to be removed]]

Latest revision as of 23:17, 9 April 2021


In unele situatii, da. De exemplu, daca folositi GHC - The Glasgow Haskell Compiler sau GHCI - GHC Interactiv, puteti rula un program ca acesta:

module Jumătate where

jumătate 			:: (Fractional a) => a -> a
jumătate x			= x * 0.5

Si obtineti asa ceva (aici pe Ubuntu 10.10 + GHC6):

danu@computer:~/Desktop$ ghci a.hs
GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Jumătate         ( a.hs, interpreted )
Ok, modules loaded: Jumătate.
*Jumătate> 
*Jumătate> jumătate 10
5.0
*Jumătate>

Dar interpretorul Hugs pe care l-am folosit nu a permis asa ceva.