Se poate scrie un nume de functie cu diacritice ?

From HaskellWiki
Revision as of 09:46, 29 July 2011 by Ha$kell (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


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.