code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
{-
Copyright (C) 2012-2017 Kacper Bak, Jimmy Liang, Michal Antkiewicz, Luke Michael Brown <http://gsd.uwaterloo.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), ... | gsdlab/clafer | src/Language/Clafer/Intermediate/Intclafer.hs | mit | 16,995 | 0 | 15 | 4,012 | 4,187 | 2,242 | 1,945 | 274 | 1 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, GeneralizedNewtypeDeriving #-}
module Program.Cexp.Annotated where
import Program.Cexp.Type hiding ( Symbol, Literal )
import qualified Program.Cexp.Type as T
import Data.Map ( Map )
import qualified Data.Map as M
import Autolib.FiniteMap
import Control.Monad ( forM... | Erdwolf/autotool-bonn | src/Program/Cexp/Annotated.hs | gpl-2.0 | 8,867 | 1 | 28 | 3,485 | 2,634 | 1,285 | 1,349 | 171 | 22 |
module Paths_haskell_scheme (
version,
getBinDir, getLibDir, getDataDir, getLibexecDir,
getDataFileName
) where
import qualified Control.Exception as Exception
import Data.Version (Version(..))
import System.Environment (getEnv)
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
catchIO = Excepti... | pennetti/scheme-repl | dist/build/autogen/Paths_haskell_scheme.hs | gpl-2.0 | 1,184 | 0 | 10 | 164 | 329 | 188 | 141 | 25 | 1 |
-- MisclassificationRate.hs ---
--
-- Filename: MisclassificationRate.hs
-- Description:
-- Author: Manuel Schneckenreither
-- Maintainer:
-- Created: Sun Mar 1 17:25:15 2015 (+0100)
-- Version:
-- Package-Requires: ()
-- Last-Updated: Sun Mar 1 17:25:40 2015 (+0100)
-- By: Manuel Schneckenreither
-- Up... | schnecki/HaskellMachineLearning | src/Data/ML/MisclassificationRate.hs | gpl-3.0 | 679 | 0 | 5 | 128 | 59 | 52 | 7 | 3 | 0 |
{-|
Module : Bench
Description : Benchmark of Multilinear library
Copyright : (c) Artur M. Brodzki, 2018
License : BSD3
Maintainer : artur@brodzki.org
Stability : experimental
Portability : Windows/POSIX
-}
module Main (
main
) where
import Criterion.Main
import Criterion.Types
... | ArturB/Multilinear | benchmark/gpu/time/Bench.hs | gpl-3.0 | 1,485 | 0 | 10 | 338 | 354 | 191 | 163 | 24 | 1 |
{-# LANGUAGE TemplateHaskell #-}
-- Copyright (C) 2010-2012 John Millikin <jmillikin@gmail.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- any ... | tmishima/haskell-dbus | tests/DBusTests/Introspection.hs | gpl-3.0 | 5,946 | 81 | 21 | 1,106 | 1,413 | 731 | 682 | 133 | 3 |
module TownParser where
import Text.Parsec
import Control.Monad (liftM)
import WorldParser (Coord, parseCoord)
data TownData = TownData { name :: String } deriving (Show, Read)
parseName :: Parsec String () String
parseName = do
n <- many anyChar
return n
parseTownData :: Parsec String () (Coord,TownData)
parse... | maxwelljoslyn/DnDMapAndEcon | TownParser.hs | gpl-3.0 | 605 | 0 | 14 | 123 | 224 | 113 | 111 | 23 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.DFAReporting.Types.Sum
-- Copyright : (c) 2015-2016 Br... | brendanhay/gogol | gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Sum.hs | mpl-2.0 | 338,182 | 0 | 11 | 74,176 | 51,345 | 26,868 | 24,477 | 6,578 | 0 |
{-# LANGUAGE CPP, Unsafe, UnliftedFFITypes, MagicHash, UnboxedTuples #-}
module Graphics.OpenGLES.Base.Proc (glGetProcAddress) where
import Foreign
import Foreign.C.String
import GHC.Base (realWorld#)
import GHC.CString (unpackCString#)
import GHC.IO (IO (IO))
import GHC.Ptr (Ptr(..))
import System.IO.Unsafe (u... | capsjac/opengles | src/Graphics/OpenGLES/Base/Proc.hs | lgpl-3.0 | 1,870 | 4 | 9 | 315 | 197 | 116 | 81 | -1 | -1 |
------------------------------------------------------------------------------
-- Copyright 2012 Microsoft Corporation.
--
-- This is free software; you can redistribute it and/or modify it under the
-- terms of the Apache License, Version 2.0. A copy of the License can be
-- found in the file "license.txt" at the... | lpeterse/koka | src/Kind/Infer.hs | apache-2.0 | 42,775 | 0 | 30 | 12,996 | 12,103 | 5,938 | 6,165 | 666 | 13 |
{-# OPTIONS_GHC
-fno-warn-unused-imports
-fno-warn-missing-signatures
-fno-warn-orphans
-fno-warn-unused-imports
-fno-warn-unused-binds
-fno-warn-unused-do-bind
#-}
module Arbitrary.ModulePath where
import Test.QuickCheck
import Data.Char
import Data.ModulePath
import Control.Applicative hiding (empty)
i... | jfeltz/tasty-integrate | tests/Arbitrary/ModulePath.hs | bsd-2-clause | 1,004 | 0 | 11 | 173 | 294 | 152 | 142 | 24 | 1 |
{-# LANGUAGE Haskell2010 #-}
{-# LANGUAGE DataKinds, GADTs, KindSignatures, PatternSynonyms, TypeOperators,
ViewPatterns #-}
module BundledPatterns2 (Vec((:>), Empty), RTree(..)) where
import GHC.TypeLits
import BundledPatterns
pattern Empty :: Vec 0 a
pattern Empty <- Nil
| haskell/haddock | html-test/src/BundledPatterns2.hs | bsd-2-clause | 290 | 0 | 6 | 49 | 54 | 35 | 19 | 11 | 0 |
{-# OPTIONS_GHC -w #-}
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns -fno-warn-overlapping-patterns #-}
module ParTree where
import AbsTree
import LexTree
import ErrM
import qualified Data.Array as Happy_Data_Array
import qualified GHC.Exts as Happy_GHC_Exts
-- parser produced by Ha... | aarneranta/china | penn/ParTree.hs | bsd-2-clause | 18,745 | 254 | 20 | 3,148 | 4,994 | 2,695 | 2,299 | -1 | -1 |
module Lib (
Operation,
rpnRun,
rpnRunEmpty,
rpnParse,
rpnParseRun,
rpnParseRunEmpty
) where
import Data.Char (isDigit)
import Data.List (intercalate)
import Data.Either (isRight, rights, lefts)
import Control.Monad ((<=<))
data Operation = Push Int | Add | Sub | Mul | Div | Mod | Switch | Dup... | Kasran/RPNCalc | src/Lib.hs | bsd-3-clause | 1,973 | 0 | 9 | 417 | 976 | 504 | 472 | 51 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
-- |
-- Module: TestCase
-- Description: All test cases aggregated and exported as tests :: [Test].
-- Copyright: (c) 2015-2016, Ixperta Solutions s.r.o.
-- License: BSD3
--
-- Stability: stable
-- Portability: NoImplicitPrelude
--
-- All test cases aggregated and e... | IxpertaSolutions/windows-named-pipes | test/TestCase.hs | bsd-3-clause | 627 | 0 | 7 | 109 | 76 | 53 | 23 | 8 | 1 |
-- | Left factoring of grammars.
{-# LANGUAGE ScopedTypeVariables #-}
module Data.Cfg.LeftFactor (
LF(..),
hasLeftFactors,
leftFactor
) where
import Control.Monad.Writer(Writer, liftM, runWriter, tell)
import Data.Cfg.Cfg(Cfg, ProductionMap, V(..), Vs, productionMap)
import Data.Cfg.FreeCfg(FreeCfg, bi... | nedervold/context-free-grammar | src/Data/Cfg/LeftFactor.hs | bsd-3-clause | 5,048 | 0 | 15 | 1,562 | 2,140 | 1,140 | 1,000 | 108 | 2 |
module PatternRecogn.Lina(
Matrix, Vector,
MatrixOf, VectorOf,
module Lina
) where
import Numeric.LinearAlgebra as Lina hiding( Matrix, Vector )
import qualified Numeric.LinearAlgebra as LinaIntern
type Matrix = LinaIntern.Matrix Double
type Vector = LinaIntern.Vector Double
type MatrixOf = LinaIntern.Matrix
typ... | EsGeh/pattern-recognition | src/PatternRecogn/Lina.hs | bsd-3-clause | 351 | 6 | 6 | 48 | 92 | 58 | 34 | 10 | 0 |
{-# LANGUAGE RecordWildCards, PatternGuards #-}
-- | A Ninja style environment, basically a linked-list of mutable hash tables.
module Development.Ninja.Env(
Env, newEnv, scopeEnv, addEnv, askEnv
) where
import qualified Data.HashMap.Strict as Map
import Data.Hashable
import Data.IORef
data Env k v = Env (I... | nh2/shake | Development/Ninja/Env.hs | bsd-3-clause | 970 | 0 | 14 | 239 | 430 | 215 | 215 | 21 | 3 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
module B... | leptonyu/mint | corn/src/Base/Context.hs | bsd-3-clause | 5,314 | 0 | 16 | 1,303 | 1,638 | 860 | 778 | 116 | 2 |
module Lib
( answers
) where
import qualified Day1 as Day1
import qualified Day2 as Day2
import qualified Day3 as Day3
import qualified Day4 as Day4
import qualified Day5 as Day5
import qualified Day6 as Day6
import qualified Day8 as Day8
import qualified Day10 as Day10
import qualified Day12 as Day12
answers... | hlmerscher/advent-of-code-2015 | src/Lib.hs | bsd-3-clause | 800 | 0 | 8 | 176 | 214 | 112 | 102 | 29 | 1 |
{-|
Module : Data.Number.MPFR.Mutable.Special
Description : Special functions
Copyright : (c) Aleš Bizjak
License : BSD3
Maintainer : ales.bizjak0@gmail.com
Stability : experimental
Portability : non-portable
For documentation on particular functions see
<http://www.... | ekmett/hmpfr | src/Data/Number/MPFR/Mutable/Special.hs | bsd-3-clause | 5,297 | 0 | 10 | 1,127 | 1,836 | 876 | 960 | 100 | 1 |
{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
#if __GLASGOW_HASKELL__ < 710
{-# LANGUAGE OverlappingInstances #-}
#endif
-- | See "Control.... | bitemyapp/ether | src/Control/Monad/Ether/State/Class.hs | bsd-3-clause | 5,268 | 0 | 13 | 1,326 | 1,986 | 1,050 | 936 | 113 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
module Data.Type.Quote where
import Control.Arrow
import Langua... | kylcarte/type-combinators-quote | src/Data/Type/Quote.hs | bsd-3-clause | 3,465 | 0 | 13 | 880 | 1,497 | 771 | 726 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
module Yng.Types where
import Data.Aeson (ToJSON)
import GHC.Generics
data GithubUser = GithubUser {
handle :: String,
repositories :: [String]
} deriving (Show, Eq, Generic)
instance ToJSON GithubUser
data GithubError = GithubError deriving (Show, Eq)
| NorthParkSoftware/yournextgig-backend | src/Yng/Types.hs | bsd-3-clause | 296 | 0 | 9 | 50 | 86 | 50 | 36 | 10 | 0 |
{-# LANGUAGE TupleSections, GADTs, StandaloneDeriving, DataKinds #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Glambda.Token
-- Copyright : (C) 2015 Richard Eisenberg
-- License : BSD-style (see LICENSE)
-- Maintainer : Richard Eisenberg (ra... | goldfirere/glambda | src/Language/Glambda/Token.hs | bsd-3-clause | 5,561 | 15 | 10 | 1,305 | 1,539 | 837 | 702 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE ExistentialQuantification #-}
module Yesod.Auth.DeskCom
( YesodDeskCom(..)
, deskComCreateCreds
, DeskComCredentials
, DeskComUser(..)
, DeskComUserId(..)
, DeskComCustomField
, DeskCom
, getDeskCom
, deskComLoginRoute
, deskComM... | fpco/yesod-auth-deskcom | src/Yesod/Auth/DeskCom.hs | bsd-3-clause | 10,809 | 0 | 19 | 2,684 | 1,577 | 927 | 650 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-}
module Clay.Border
(
-- * Stroke type.
Stroke
, solid, dotted, dashed, double, wavy
-- * Border properties.
, border, borderTop, borderLeft, borderBottom, borderRight
, borderColor, borderLeftColor, borderRightColor, borderTopColor, borderBottomColor
, ... | bergmark/clay | src/Clay/Border.hs | bsd-3-clause | 2,846 | 0 | 8 | 442 | 690 | 392 | 298 | 57 | 1 |
-- | Stolen from rack: catches all exceptions raised from the app it wraps.
module Hack2.Contrib.Middleware.ShowExceptions (show_exceptions) where
import Data.Default
import Data.Maybe
import Hack2
import Hack2.Contrib.Middleware.Hub
import Hack2.Contrib.Utils
import Air.Light
import Prelude hiding ((.), (^), (>), (... | nfjinjing/hack2-contrib | src/Hack2/Contrib/Middleware/ShowExceptions.hs | bsd-3-clause | 909 | 0 | 17 | 166 | 280 | 159 | 121 | 23 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE... | cdornan/keystore | src/Data/KeyStore/Types/Schema.hs | bsd-3-clause | 5,665 | 0 | 5 | 1,857 | 77 | 57 | 20 | 26 | 1 |
module Text.Highlighter.Lexers.Atomo (lexer) where
import Data.List (intercalate)
import Text.Printf
import Text.Regex.PCRE.Light
import Text.Highlighter.Types
lexer :: Lexer
lexer = Lexer
{ lName = "Atomo"
, lAliases = ["atomo"]
, lExtensions = [".atomo"]
, lMimetypes = ["text/x-atomo"]
, lStar... | chemist/highlighter | src/Text/Highlighter/Lexers/Atomo.hs | bsd-3-clause | 4,631 | 0 | 11 | 1,002 | 1,481 | 823 | 658 | 98 | 1 |
module Main where
import Network.Krist.Address
import Network.Krist.Node
import Network.Krist.Work
import Network.Krist.Block
import Data.Krist.PrivateKey
import Data.Krist.Address
main :: IO ()
main = do x <- getAddress defaultNode "khugepoopy"
print x
y <- getAddresses defaultNode 10
... | demhydraz/krisths | app/Main.hs | bsd-3-clause | 1,001 | 0 | 11 | 327 | 258 | 120 | 138 | 27 | 3 |
{-# OPTIONS_GHC -F -pgmF htfpp #-}
module Main where
import Test.Framework
import {-@ HTF_TESTS @-} MultiTrieTest
main :: IO()
main = htfMain htf_importedTests
| vadimvinnik/multi-trie | tests/Spec.hs | mit | 164 | 0 | 6 | 27 | 32 | 19 | 13 | 6 | 1 |
{-# LANGUAGE PolyKinds #-}
module Database.Edis.Command.Scripting where
import Database.Edis.Type
import Data.ByteString (ByteString)
import Database.Redis as Redis hiding (decode)
--------------------------------------------------------------------------------
-- Scripting
-------------------------------... | banacorn/tredis | src/Database/Edis/Command/Scripting.hs | mit | 1,129 | 0 | 11 | 168 | 335 | 179 | 156 | 19 | 1 |
{- |
Module : $Header$
Description : folding functions for CASL terms and formulas
Copyright : (c) Christian Maeder, Uni Bremen 2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : portable
folding functions for CASL terms and... | keithodulaigh/Hets | CASL/Fold.hs | gpl-2.0 | 6,786 | 0 | 13 | 1,793 | 2,544 | 1,319 | 1,225 | 135 | 15 |
module HAHP.Data.Utils where
import Data.Map (Map)
import GHC.Generics
import Numeric.LinearAlgebra.HMatrix
import HAHP.Data.Core
-- * Data retrieve functions
getTreeLeaves :: AHPTree -- ^ Input tree
-> [AHPTree] -- ^ List of the leaves
ge... | Taeradan/hahp | src/HAHP/Data/Utils.hs | gpl-3.0 | 1,341 | 0 | 10 | 399 | 281 | 152 | 129 | 31 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module HROOT.Data.IO.Class where
import FFICXX.Generate.Code.Primitive ( cstring, int )
import FFICXX.Generate.Type.Cabal ( BuildType(..), Cabal(..), CabalName(..) )
import FFICXX.Generate.Type.Class ( Class(..)
, Function(..)
... | wavewave/HROOT | HROOT-generate/lib/HROOT/Data/IO/Class.hs | gpl-3.0 | 2,689 | 0 | 9 | 821 | 644 | 390 | 254 | 68 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2013-15 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Ed... | Gabriel439/succinct | src/Succinct/Dictionary/Poppy.hs | bsd-2-clause | 5,775 | 0 | 20 | 1,797 | 1,740 | 911 | 829 | 139 | 1 |
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, TemplateHaskell,
FlexibleInstances, FlexibleContexts, MultiParamTypeClasses,
TypeOperators, TypeSynonymInstances #-}
module Distribution.Server.Features.BuildReports.State where
import Distribution.Server.Features.BuildReports.BuildReports (Build... | isomorphism/hackage2 | Distribution/Server/Features/BuildReports/State.hs | bsd-3-clause | 3,245 | 0 | 12 | 650 | 720 | 387 | 333 | 62 | 2 |
{-
Copyright 2013-2015 Mario Blazevic
License: BSD3 (see BSD3-LICENSE.txt file)
-}
-- | This module defines the 'FactorialMonoid' class and some of its instances.
--
{-# LANGUAGE Haskell2010, Trustworthy #-}
module Data.Monoid.Factorial (
-- * Classes
FactorialMonoid(..), StableFactorialMonoid,
-- ... | mpickering/ghc-exactprint | tests/examples/ghc710/Undefined10.hs | bsd-3-clause | 31,158 | 0 | 17 | 8,756 | 11,679 | 6,030 | 5,649 | -1 | -1 |
{-# Language PatternGuards #-}
module Blub
( blub
, foo
, bar
) where
import Ugah.Foo
import Control.Applicative
import Control.Monad
import Ugah.Blub
ddd
f :: Int -> Int
f = (+ 3)
| jystic/hsimport | tests/goldenFiles/ModuleTest20.hs | bsd-3-clause | 193 | 0 | 5 | 44 | 57 | 35 | 22 | -1 | -1 |
-- {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
Copyright 2017 The CodeWorld Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | three/codeworld | funblocks-client/src/Main.hs | apache-2.0 | 6,083 | 24 | 16 | 1,415 | 1,362 | 679 | 683 | 133 | 3 |
module Tree where
import Gofer
-- Here are a collection of fairly standard functions for manipulating
-- one form of binary trees
data Tree a = Lf a | Tree a :^: Tree a
reflect t@(Lf x) = t
reflect (l:^:r) = r :^: l
mapTree f (Lf x) = Lf (f x)
mapTree f (l:^:r) = mapTree f l :^: mapTree f r
-- Functions to cal... | FranklinChen/Hugs | demos/Tree.hs | bsd-3-clause | 2,102 | 0 | 15 | 870 | 715 | 381 | 334 | 35 | 2 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ro-RO">
<title>Network Add-on</title>
<maps>
<homeID>addon.network</homeID>
<mapref loc... | kingthorin/zap-extensions | addOns/network/src/main/javahelp/help_ro_RO/helpset_ro_RO.hs | apache-2.0 | 969 | 77 | 67 | 156 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE StandaloneKindSignatures #-}
module T16727a where
type T1 :: T2
data T1
type T2 :: T1
data T2
| sdiehl/ghc | testsuite/tests/saks/should_fail/T16727a.hs | bsd-3-clause | 110 | 0 | 4 | 22 | 23 | 16 | 7 | -1 | -1 |
module Test6 where
f = (\ x y z -> x + y + z)
| SAdams601/HaRe | old/testing/refacSlicing/Test6.hs | bsd-3-clause | 47 | 0 | 8 | 16 | 29 | 17 | 12 | 2 | 1 |
module A3 where
import C3
main xs
= case xs of
[] -> 0
[(x : xs)]
-> (x ^ pow) +
(case xs of
((x : xs)) -> (sq x) + (sumSquares1 xs)
[] -> 0)
| kmate/HaRe | old/testing/unfoldDef/A3_AstOut.hs | bsd-3-clause | 181 | 4 | 15 | 76 | 105 | 57 | 48 | 10 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Traversable
-- Copyright : Conor McBride and Ross Paterson 2005
-- License : BSD-style (see the LICENSE file in the distribution)
--
-- Maintainer : ross@soi.city.ac.uk
-- Stability : experimental
-- P... | m-alvarez/jhc | lib/applicative/Data/Traversable.hs | mit | 6,555 | 0 | 12 | 1,659 | 1,414 | 774 | 640 | 69 | 1 |
{-# LANGUAGE GADTs #-}
-- Trac #289
module ShouldCompile where
class C a where
f :: a -> Bool
data T a where
MkT :: (C a) => a -> T a
tf1 :: T Int -> Bool
tf1 (MkT aa) = f aa
tf2 :: T a -> Bool
tf2 (MkT aa) = f aa
| urbanslug/ghc | testsuite/tests/gadt/data1.hs | bsd-3-clause | 241 | 0 | 7 | 83 | 108 | 57 | 51 | 10 | 1 |
import Data.Char
import Data.List
--1
perimetro :: Float -> Float
perimetro r = 2*3.14*r
dist :: (Float, Float) -> (Float, Float) -> Float
dist (x1, y1) (x2, y2) = sqrt ((x2 - x1)^2 + (y2 - y1)^2)
primUlt :: [a] -> (a, a)
primUlt [x] = (x, x)
primUlt (x:xs) = (x, last xs)
multiplo :: Int -> Int -> Bool
multiplo... | Qu4tro/PF | CadernoTP-1314.hs | mit | 14,110 | 0 | 14 | 4,331 | 6,836 | 3,698 | 3,138 | 362 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-}
import Yesod.Core
import Yesod.Form
import Yesod.Form.MassInput
import Control.Applicative
import Data.Text (Text, pack)
import Network.Wai.Handler.Warp (run)
import Data.Time (utctDay, getCurrentTime)
... | piyush-kurur/yesod | yesod-form/hello-forms.hs | mit | 3,531 | 0 | 16 | 847 | 852 | 460 | 392 | 68 | 3 |
module GHCJS.DOM.Rect (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/Rect.hs | mit | 34 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
module D20.Internal.Utils.Transform where
import qualified Data.Map as M
import Data.List
flipTuple :: (a,b) -> (b,a)
flipTuple (a,b) = (b,a)
flipMap :: (Ord b)
=> M.Map a b -> M.Map b a
flipMap = M.fromList . map flipTuple . M.toList
zipWithIndex :: [a] -> [(a,Int)]
zipWithIndex =
zipWith (\index el -> (... | elkorn/d20 | src/D20/Internal/Utils/Transform.hs | mit | 348 | 0 | 8 | 77 | 165 | 97 | 68 | 12 | 1 |
module SDL.Image.Raw.Loading
( -- * Automagic Loading
imgLoad
, imgLoadRW
, imgLoadRWTyped
-- * Specific Loaders
, imgLoadRWJPG
, imgLoadRWPNG
, imgLoadRWBMP
, imgLoadRWCUR
, imgLoadRWGIF
, imgLoadRWICO
, imgLoadRWLBM
, imgLoadRWPCX
, imgLoadRWPNM
, imgLoadRWTGA
, img... | jaiyalas/sdl2-image | src/SDL/Image/Raw/Loading.hs | mit | 5,880 | 0 | 12 | 1,427 | 1,544 | 795 | 749 | 148 | 1 |
module Main where
import Control.Monad (forM_)
import Data.Function
import Network.Monitoring.Riemann.BatchClient
import Network.Monitoring.Riemann.Client
import qualified Network.Monitoring.Riemann.Event as Event
main :: IO ()
main = do
client <- batchClient "localhost" 5555 100 100 print
putStrLn "doing some IO... | shmish111/hriemann | app/Main.hs | mit | 632 | 0 | 14 | 118 | 204 | 106 | 98 | 20 | 1 |
-- Type annotation (optional)
factorial :: Integer -> Integer
-- Point-free style
factorial = foldr (*) 1 . enumFromTo 1
| butchhoward/xhaskell | factorial_point_free.hs | mit | 124 | 0 | 6 | 22 | 31 | 17 | 14 | 2 | 1 |
f :: Num a => a -> a
f x = (^2) x
main1 = print (f 42)
-- 1764
-- ------------------------------------------------------
data Maybe' a = Just' a | Nothing'
deriving (Show)
-- To achieve
-- f (Just' 42)
-- we could either write a new function
fMaybe _ Nothing' = Nothing'
fMaybe f (Just' x) = Just' (f x)
... | uroboros/haskell_design_patterns | chapter3/1_functor.hs | mit | 1,240 | 0 | 10 | 308 | 289 | 158 | 131 | 17 | 1 |
-- http://stackoverflow.com/questions/2349233/catching-control-c-exception-in-ghc-haskell
import Control.Exception as E
import Control.Concurrent
import System.Posix.Signals
import System.IO
main :: IO ()
main = do
tid <- myThreadId
installHandler keyboardSignal (Catch (throwTo tid UserInterrupt)) Nothing
--hS... | tychon/phrases | test_catch_ctrlc.hs | mit | 781 | 0 | 11 | 188 | 200 | 99 | 101 | 24 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Transform.Fourier.R2DIF
-- Copyright : (c) Matthew Donadio 2003
-- License : GPL
--
-- Maintainer : m.p.donadio@ieee.org
-- Stability : experimental
-- Portability : portable
--
-- Radix-2 Decimati... | tolysz/dsp | Numeric/Transform/Fourier/R2DIF.hs | gpl-2.0 | 1,621 | 0 | 14 | 369 | 414 | 232 | 182 | 19 | 1 |
data PatriciaTrieR a = Tip a
| Arm Bool (PatriciaTrieR a)
| Branch (PatriciaTrieR a) (PatriciaTrieR a)
data Maybe a = Just a | Nothing
type PatriciaTrie a = Maybe (PatriciaTrieR a)
type BVec = [Bool]
singletonR :: {n : ℕ} -> BVec n -> A -> PatriciaTrieR n
singletonR [] ... | danr/hipspec | examples/old-examples/quickspec/Patricia.hs | gpl-3.0 | 1,662 | 38 | 11 | 476 | 966 | 482 | 484 | -1 | -1 |
module FRP.Chimera.Environment.Discrete
(
Discrete2dDimension
, Discrete2dCoord
, Discrete2dNeighbourhood
, Discrete2dCell
, Discrete2d (..)
, SingleOccupantCell
, SingleOccupantDiscrete2d
, MultiOccupantCell
, MultiOccupantDiscrete2d
, createDiscrete2d
, dimensionsDisc2d
, dimensionsDi... | thalerjonathan/phd | coding/libraries/chimera/src/FRP/Chimera/Environment/Discrete.hs | gpl-3.0 | 13,227 | 0 | 12 | 2,642 | 3,919 | 2,096 | 1,823 | 269 | 1 |
-- | Monomorphises the Simple language, given some initial activated
-- records. The idea is that these activation records come from
-- a monomorphised conjecture.
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, PatternGuards #-}
module HipSpec.Lang.Monomorphise (monoClauses, IdInst(..),Lemma(..),toList,Records)... | danr/hipspec | src/HipSpec/Lang/Monomorphise.hs | gpl-3.0 | 9,634 | 0 | 22 | 2,943 | 3,991 | 2,100 | 1,891 | 183 | 5 |
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable, MonadComprehensions #-}
module Main where
import Transient.Move
import Transient.Logged
import Transient.Base
import Transient.Indeterminism
import Network
import Control.Applicative
import Control.Monad.IO.Class
import System.Environment
import System.IO.Unsafe
i... | haskellGardener/transient | move.hs | gpl-3.0 | 5,751 | 0 | 19 | 1,571 | 1,310 | 670 | 640 | 110 | 4 |
{-#LANGUAGE RankNTypes, ScopedTypeVariables, FlexibleContexts, FlexibleInstances, UndecidableInstances, MultiParamTypeClasses #-}
module Carnap.Languages.PurePropositional.Logic.Gentzen
( parseGentzenPropLK, gentzenPropLKCalc, GentzenPropLK()
, parseGentzenPropLJ, gentzenPropLJCalc, GentzenPropLJ()
, parseG... | gleachkr/Carnap | Carnap/src/Carnap/Languages/PurePropositional/Logic/Gentzen.hs | gpl-3.0 | 19,486 | 0 | 16 | 6,520 | 6,275 | 3,190 | 3,085 | 319 | 1 |
import IniParserTest
import LogFileTest
main :: IO ()
main = do
iniParserTest
logParserTest | nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles | ParserCombinators/test/Spec.hs | gpl-3.0 | 101 | 0 | 6 | 22 | 28 | 14 | 14 | 6 | 1 |
{-|
Module: Environment
Description: Internal state and environment of the interpreter
License: GPL-3
This module contains all the auxiliary logic necessary to represent the internal
state of the interpreter.
-}
module Environment
(
-- * Environment
Environment
, context
, defaultEnv
, emptyContext
--... | M42/mikrokosmos | source/Environment.hs | gpl-3.0 | 3,377 | 0 | 10 | 721 | 642 | 384 | 258 | 78 | 2 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module... | plcplc/hie | hie-js/src/Lib.hs | agpl-3.0 | 6,991 | 0 | 19 | 2,092 | 787 | 413 | 374 | -1 | -1 |
module CGTools.Validate.Test ( validateSuite ) where
import Data.Char (isPrint,isSymbol)
import Test.Tasty (testGroup, TestTree)
import Test.Tasty.HUnit
import Test.Tasty.SmallCheck (forAll)
import qualified Tes... | shanewilson/cgtools | test/CGTools/Validate/Test.hs | apache-2.0 | 2,269 | 0 | 10 | 623 | 255 | 168 | 87 | 17 | 1 |
-- http://book.realworldhaskell.org/read/using-parsec.html
-- JSON parser
import JSONClass
import Numeric (readFloat, readHex, readSigned)
import Control.Applicative (empty)
import Text.ParserCombinators.Parsec
p_text :: CharParser () JValue
p_text = spaces *> text
<?> "JSON text"
where text = JObject <$> ... | egaburov/funstuff | Haskell/parsec/p05.hs | apache-2.0 | 2,455 | 0 | 16 | 759 | 770 | 400 | 370 | 60 | 2 |
import Data.List
import Data.Char (ord)
import Numeric
import Data.List.Split (splitOn)
import Math.NumberTheory.Primes.Testing (isPrime)
-- Remove quotes at the beginning and the end of a string
removeQuotes name = reverse $ drop 1 $ reverse $ drop 1 name
triangleNumbers :: [Integer]
triangleNumbers = triangleWorker... | ulikoehler/ProjectEuler | Euler42.hs | apache-2.0 | 938 | 0 | 14 | 205 | 327 | 171 | 156 | 19 | 1 |
-- Based on O.Kiselyov work
-- Copyright (C) 2009 Kyra
-- Copyright (C) 2016 Braam Research, LLC.
{-# LANGUAGE GADTs #-}
module Text.Scanf where
import Data.List ( isPrefixOf, uncons )
import Data.Char ( isDigit, isSpace )
-- import Control.Parallel ( par, pseq )
t2j, t2n :: Bool -> a -> Maybe a
t2j True v = Just ... | SKA-ScienceDataProcessor/RC | MS6/LogAn/Text/Scanf.hs | apache-2.0 | 3,396 | 0 | 13 | 912 | 1,450 | 767 | 683 | 78 | 2 |
-- forever takes an I/O action and returns an I/O action that just repeats the
-- I/O action it got forever. It's located in Control.Monad. This little program
-- will indefinitely ask the user for some input and spit it back to him,
-- CAPSLOCKED:
import Control.Monad
import Data.Char
main = forever $ do
putStr "G... | Oscarzhao/haskell | learnyouahaskell/forever.hs | apache-2.0 | 383 | 0 | 9 | 76 | 49 | 25 | 24 | 6 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QDialogButtonBox_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:14
Warning : this file is machine generated... | keera-studios/hsQt | Qtc/Gui/QDialogButtonBox_h.hs | bsd-2-clause | 60,085 | 0 | 18 | 12,271 | 18,825 | 9,082 | 9,743 | -1 | -1 |
module Test.Kibr where
import Preamble
import Test.Framework (defaultMainWithArgs)
import qualified Test.Kibr.Css as Css
import qualified Test.Kibr.Http as Http
import qualified Test.Kibr.Irc as Irc
import qualified Test.Kibr.Xml as Xml
run :: [String] -> IO ()
run = defaultMainWithArgs [Css.tests, Http.tests, I... | dag/kibr | src/Test/Kibr.hs | bsd-2-clause | 341 | 0 | 7 | 48 | 100 | 65 | 35 | 9 | 1 |
{-# LANGUAGE UndecidableInstances, FlexibleContexts, FlexibleInstances, EmptyDataDecls, MultiParamTypeClasses, FunctionalDependencies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Type.Ord
-- Copyright : (C) 2006-2007 Edward Kmett
-- License : BSD-... | ekmett/type-int | Data/Type/Ord.hs | bsd-2-clause | 2,095 | 0 | 7 | 496 | 769 | 415 | 354 | -1 | -1 |
module FieldML.Utility01 ( -- Todo: rename and relocate this module.
freeVariables,
domain,
codomain,
expressionType,
canonicalSuperset,
simplifyFSet,
validExpression,
lambdaLike,
cardinality
)
where
import FieldML.Core
import Data.List ( delete, nub, (\\) )
import Data.Set (size, member)
-- Focus ... | codecurve/FieldML-Haskell-01 | src/FieldML/Utility01.hs | bsd-2-clause | 21,775 | 0 | 18 | 3,941 | 6,762 | 3,360 | 3,402 | 381 | 8 |
{-# LANGUAGE ViewPatterns #-}
module Typecheck where
import Control.Monad.Except
import Control.Monad.Trans
import Debug.Trace
import Term
import qualified Data.Map as Map
import qualified Data.Set as Set
import Unbound.G... | faineance/totes | src/Typecheck.hs | bsd-3-clause | 2,226 | 0 | 15 | 668 | 874 | 449 | 425 | 61 | 5 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
module EFA.Data.Type where
--import EFA.Data.Type.Physical
--import EFA.Data.Type.Efa
newtype TC p f e a = TC a
instance Functor (TC p f e) where
fmap f (TC x) = TC $ f x
{-
data Wrap a = WrapPower (TC Power Time Edge a) |
Wr... | energyflowanalysis/efa-2.1 | src/EFA/Data/Type.hs | bsd-3-clause | 764 | 0 | 8 | 181 | 65 | 39 | 26 | 6 | 0 |
{-# LANGUAGE EmptyDataDecls, FlexibleInstances, TypeFamilies #-}
-- | Type functions: interpretations of the type constants
--
-- <http://okmij.org/ftp/gengo/NASSLLI10/>
--
module Lambda.CFG3Sem where
data S -- clause
data NP -- noun phrase
data VP ... | suhailshergill/liboleg | Lambda/CFG3Sem.hs | bsd-3-clause | 1,363 | 0 | 10 | 446 | 383 | 213 | 170 | -1 | -1 |
module Main where
import Test.Tasty (defaultMain,testGroup)
import qualified Data.RDF.Graph.TriplesList_Test as TriplesList
import qualified Data.RDF.Graph.HashMapS_Test as HashMapS
import qualified Data.RDF.Graph.HashMapSP_Test as HashMapSP
import qualified Data.RDF.Graph.MapSP_Test as MapSP
import qualified Data.RD... | jutaro/rdf4h | testsuite/tests/Test.hs | bsd-3-clause | 3,239 | 0 | 14 | 665 | 541 | 316 | 225 | 72 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.PackageIndex
-- Copyright : (c) David Himmelstrup 2005,
-- Bjorn Bringert 2007,
-- Duncan Coutts 2008-200... | christiaanb/cabal | Cabal/Distribution/Simple/PackageIndex.hs | bsd-3-clause | 26,576 | 0 | 19 | 6,073 | 5,097 | 2,764 | 2,333 | 356 | 5 |
import Logic.BasicGate
main :: IO ()
main = do
putStrLn ("[L,L]->" ++ (show $ lc_and [sLO,sLO]))
putStrLn ("[L,H]->" ++ (show $ lc_and [sLO,sHI]))
putStrLn ("[H,L]->" ++ (show $ lc_and [sHI,sLO]))
putStrLn ("[H,H]->" ++ (show $ lc_and [sHI,sHI]))
| eijian/mkcpu | test/TestGate.hs | bsd-3-clause | 258 | 0 | 13 | 48 | 137 | 71 | 66 | 7 | 1 |
{-# LANGUAGE Rank2Types, TemplateHaskell #-}
module Data.Foldable1 where
import Control.Arrow
import Data.Functor1
import Language.Haskell.TH
import Language.Haskell.TH.Util
class Functor1 f => Foldable1 f where
foldrf :: (forall a. g a -> r -> r) -> r -> f g -> r
collect :: Foldable1 f => (forall a. g a -> v) ->... | craffit/flexdb | src/Data/Foldable1.hs | bsd-3-clause | 1,711 | 0 | 18 | 552 | 722 | 370 | 352 | 35 | 2 |
module Test3
where
import qualified Data.HashMap.Strict as H
import qualified Data.ByteString.Char8 as BS
import Data.List
isAlpha ch = 'a' <= ch && ch <= 'z'
wrds :: BS.ByteString -> [ BS.ByteString ]
wrds bs =
let
(_, r1) = BS.span (not . isAlpha) bs
(w, r2) = BS.span isAlpha r1
in if BS.null w the... | erantapaa/test-spelling | src/Test3.hs | bsd-3-clause | 659 | 0 | 15 | 178 | 291 | 153 | 138 | 19 | 2 |
{-# LANGUAGE CPP, ForeignFunctionInterface #-}
{-# OPTIONS_NHC98 -cpp #-}
{-# OPTIONS_JHC -fcpp -fffi #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Utils
-- Copyright : Isaac Jones, Simon Marlow 2003-2004
-- portions Copyri... | dcreager/cabal | Distribution/Simple/Utils.hs | bsd-3-clause | 34,274 | 0 | 18 | 8,420 | 6,878 | 3,629 | 3,249 | 513 | 7 |
type Cartesian = (Double, Double)
mulC :: Cartesian -> Double -> Cartesian
mulC (x, y) n = (x * n, y * n)
point1 :: Cartesian
point1 = (8, 5)
type Polar = (Double, Double)
mulP :: Polar -> Double -> Polar
mulP (d, r) n = (d * n, r)
point2 :: Polar
point2 = (10, pi / 6)
| YoshikuniJujo/funpaala | samples/21_adt/cpt.hs | bsd-3-clause | 275 | 0 | 6 | 65 | 143 | 84 | 59 | 10 | 1 |
module Appoint.Import (IssueStatus(..)) where
import Appoint.IssueStatus(IssueStatus(..))
| rob-b/appoint | src/Appoint/Import.hs | bsd-3-clause | 91 | 0 | 6 | 7 | 29 | 19 | 10 | 2 | 0 |
{-# LANGUAGE AllowAmbiguousTypes #-}
module Patches.Diff3 where
import Language.Clojure.AST
import Language.Clojure.Lang
import Language.Common
import VCS.Multirec
change a b = As (Contract (a, b))
keep a = change a a
recurse a = Ai (AlmuH a)
variable a = (Term (TaggedString "Var" a emptyRange) emptyRange)
nil = ... | nazrhom/vcs-clojure | src/Patches/Diff3.hs | bsd-3-clause | 4,245 | 0 | 20 | 1,584 | 1,393 | 691 | 702 | 145 | 1 |
{-# LANGUAGE InstanceSigs #-}
-- c の取り扱いが sml と異なっている(データ構造に c を含めている)点に注意
module PFDS.Commons.BankersDeque where
import PFDS.Commons.Deque
data BankersDeque a = Q Int Int [a] Int [a] deriving (Show)
instance Deque BankersDeque where
empty :: BankersDeque a
empty = Q 4 0 [] 0 []
isEmpty :: Ban... | matonix/pfds | src/PFDS/Commons/BankersDeque.hs | bsd-3-clause | 1,830 | 0 | 13 | 570 | 1,019 | 515 | 504 | 47 | 1 |
module Pos.Chain.Lrc.Error
(
LrcError (..)
) where
import Universum
import Formatting (bprint, build, int, stext, (%))
import qualified Formatting.Buildable
import Pos.Core.Slotting (EpochIndex)
data LrcError
= LrcDataUnknown !EpochIndex !Text
| UnknownBl... | input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Lrc/Error.hs | mit | 1,049 | 0 | 10 | 295 | 200 | 110 | 90 | 33 | 0 |
{-# OPTIONS_GHC -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Morphism.Cata
-- Copyright : (C) 2008 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : ... | urska19/MFP---Samodejno-racunanje-dvosmernih-preslikav | Control/Morphism/Cata.hs | apache-2.0 | 1,924 | 4 | 11 | 363 | 636 | 331 | 305 | -1 | -1 |
{- POSIX files (and compatablity wrappers).
-
- This is like System.PosixCompat.Files, but with a few fixes.
-
- Copyright 2014 Joey Hess <id@joeyh.name>
-
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
module Utility.PosixFiles (
module X,
rename
) where
import System.Po... | ArchiveTeam/glowing-computing-machine | src/Utility/PosixFiles.hs | bsd-2-clause | 1,079 | 4 | 8 | 166 | 120 | 73 | 47 | 7 | 0 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1998
Desugaring foreign declarations (see also DsCCall).
-}
{-# LANGUAGE CPP #-}
module DsForeign ( dsForeigns
, dsForeigns'
, dsFImport, dsCImport, dsFCall, dsPrimCall
, dsFExport, dsF... | bitemyapp/ghc | compiler/deSugar/DsForeign.hs | bsd-3-clause | 31,364 | 0 | 26 | 10,593 | 5,933 | 3,063 | 2,870 | -1 | -1 |
{-# LANGUAGE RecursiveDo, TypeFamilies, LambdaCase #-}
module Control.Monad.Ref where
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Reader
import Control.Monad.Writer
import Data.IORef
class Monad m => MonadRef m where
type Ref m :: * -> *
newRef :: a -> m (Ref m a)
readRef :: Ref m a -> ... | mightybyte/reflex | src/Control/Monad/Ref.hs | bsd-3-clause | 2,688 | 0 | 17 | 671 | 985 | 488 | 497 | 73 | 3 |
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, OverloadedStrings #-}
-- | Core types and operations for DOM manipulation.
module Haste.DOM.Core (
Elem (..), IsElem (..), Attribute, AttrName (..),
set, with, attribute, children,
click, focus, blur,
document, documentBody,
deleteChild, clearChildren,
... | kranich/haste-compiler | libraries/haste-lib/src/Haste/DOM/Core.hs | bsd-3-clause | 8,154 | 46 | 12 | 1,624 | 2,176 | 1,184 | 992 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
module Kalium.Util where
import Kalium.Prelude
import qualified Data.Map as M
import Control.Monad.Rename
import Control.Monad.Except
type Pairs a b = [(a, b)]
type Endo' a = a -> a
type Kleisli' m a b = a -> m b
type EndoKleisli' m a = Kleisli' m a a
mAsList :: Ord k => Iso' (Map ... | rscprof/kalium | src/Kalium/Util.hs | bsd-3-clause | 2,415 | 0 | 11 | 544 | 1,136 | 583 | 553 | 56 | 2 |
-- |
-- Module : Crypto.Cipher.RC4
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : stable
-- Portability : Good
--
-- Simple implementation of the RC4 stream cipher.
-- http://en.wikipedia.org/wiki/RC4
--
-- Initial FFI implementation by Peter White <peter@janrain.c... | nomeata/cryptonite | Crypto/Cipher/RC4.hs | bsd-3-clause | 2,846 | 0 | 17 | 801 | 492 | 274 | 218 | 46 | 1 |
module Array (
module Ix, -- export all of Ix for convenience
Array, array, listArray, (!), bounds, indices, elems, assocs,
accumArray, (//), accum, ixmap
) where
import Ix
import Data.Array
| FranklinChen/hugs98-plus-Sep2006 | packages/haskell98/Array.hs | bsd-3-clause | 208 | 0 | 4 | 47 | 59 | 41 | 18 | -1 | -1 |
foo = case v of v -> x | bitemyapp/apply-refact | tests/examples/Structure14.hs | bsd-3-clause | 22 | 0 | 7 | 7 | 16 | 8 | 8 | 1 | 1 |
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# LANGUAGE ForeignFunctionInterface #-}
----------------------------------------------------------------
-- 2010.10.09
-- |
-- Module : IsSpace
-- Copyright : Copyright (c) 2010 wren ng thornton
-- License : BSD
-- ... | beni55/attoparsec | benchmarks/IsSpace.hs | bsd-3-clause | 4,609 | 0 | 19 | 1,118 | 721 | 411 | 310 | 59 | 1 |
infixr 6 :<
infixl 5 ++
infixl 9 **
data Int = Z | S Int
data MyList a = Nil
| a :< (MyList a)
Nil ++ x = x
(a :< as) ++ x = a :< (as ++ x)
Nil ** x = Nil
(a :< as) ** x = a :< (x ** as)
class VC a where
rpl :: a -> (MyList a)
instance VC a => VC (MyList a) where
rpl x = (rpl x) :< rpl x
... | forste/haReFork | tools/base/tests/test1.hs | bsd-3-clause | 393 | 0 | 9 | 137 | 242 | 124 | 118 | 18 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.